//
//  SelectColorCollectionViewCell.m
//  BonweBuy
//
//  Created by liuxin on 2020/2/25.
//  Copyright © 2020 liuxin. All rights reserved.
//

#import "SelectColorCollectionViewCell.h"

@interface SelectColorCollectionViewCell ()
@property (nonatomic, strong) UIImageView *goodsImageView;
@end

@implementation SelectColorCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}

-(void)createSubViews{
    UIImageView *goodsImageView = [[UIImageView alloc]init];
    [self.contentView addSubview:goodsImageView];
    [goodsImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
    self.goodsImageView = goodsImageView;
}

-(void)setColorModel:(SaleAttr1ListModel *)colorModel{
    _colorModel = colorModel;
    [self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:ImageWithURL(_colorModel.imageUrl)]];
}

@end
